452 research outputs found

    Extending Stan for Deep Probabilistic Programming

    Full text link
    Stan is a popular declarative probabilistic programming language with a high-level syntax for expressing graphical models and beyond. Stan differs by nature from generative probabilistic programming languages like Church, Anglican, or Pyro. This paper presents a comprehensive compilation scheme to compile any Stan model to a generative language and proves its correctness. This sheds a clearer light on the relative expressiveness of different kinds of probabilistic languages and opens the door to combining their mutual strengths. Specifically, we use our compilation scheme to build a compiler from Stan to Pyro and extend Stan with support for explicit variational inference guides and deep probabilistic models. That way, users familiar with Stan get access to new features without having to learn a fundamentally new language. Overall, our paper clarifies the relationship between declarative and generative probabilistic programming languages and is a step towards making deep probabilistic programming easier

    Density-Based Semantics for Reactive Probabilistic Programming

    Full text link
    Synchronous languages are now a standard industry tool for critical embedded systems. Designers write high-level specifications by composing streams of values using block diagrams. These languages have been extended with Bayesian reasoning to program state-space models which compute a stream of distributions given a stream of observations. However, the semantics of probabilistic models is only defined for scheduled equations -- a significant limitation compared to dataflow synchronous languages and block diagrams which do not require any ordering. In this paper we propose two schedule agnostic semantics for a probabilistic synchronous language. The key idea is to interpret probabilistic expressions as a stream of un-normalized density functions which maps random variable values to a result and positive score. The co-iterative semantics interprets programs as state machines and equations are computed using a fixpoint operator. The relational semantics directly manipulates streams and is thus a better fit to reason about program equivalence. We use the relational semantics to prove the correctness of a program transformation required to run an optimized inference algorithm for state-space models with constant parameters

    Наноразмерные дискретные покрытия оксида меди на кристаллах хлорида натрия, осажденные из паровой фазы в вакууме

    Get PDF
    Приведены результаты исследования морфологии дискретного наноразмерного медного покрытия на поверхности порошка хлорида натрия. Способом электронно-лучевого испарения и конденсации из паровой фазы в вакууме получено равномерное и однородное покрытие. Средний размер частиц меди согласно результатам лазерной корреляционной спектроскопии составил 27 нм. Представлены рекомендации относительно возможного практического применения.The results of investigation of morphology of discrete nanodimensional copper coating on the surface of sodium chloride powder are presented. Uniform and homogeneous coating was produced by the method of electron beam evaporation and condensation from vapor phase in vacuum. The obtained average size of copper particles in accordance with results of a laser correlation spectroscopy was 27 nm. Recommendations are given for a possible practical application

    Reactivity of Cooperative Systems: Application to ReactiveML -- extended version

    Get PDF
    Cooperative scheduling enables efficient sequential implementations of concurrency. It is widely used to provide lightweight threads facilities as libraries or programming constructs in many programming languages. However, it is up to programmers to actually cooperate to ensure the reactivity of their programs. We present a static analysis that checks the reactivity of programs by abstracting them into so-called behaviors using a type-and-effect system. Our objective is to find a good compromise between the complexity of the analysis and its precision for typical reactive programs. The simplicity of the analysis is mandatory for the programmer to be able to understand error messages and how to fix reactivity problems. Our work is applied and implemented in the functional synchronous language ReactiveML. It handles recursion, higher-order processes and first-class signals. We prove the soundness of our analysis with respect to the big-step semantics of the language: a well-typed program with reactive effects is reactive. The analysis is easy to implement and generic enough to be applicable to other models of concurrency such as coroutines. This research report is the extended version of the article published at the 21st International Static Analysis Symposium.L'ordonnancement coopératif permet l'implémentation séquentielle efficace de la concurrence. Il est largement utilisé pour fournir des threads légers sous forme de bibliothèques ou de constructions de programmation dans de nombreux langages de programmation. Toutefois, il appartient aux programmeurs d'appeler des primitives de coopération pour assurer la réactivité de leurs programmes. Nous présentons une analyse statique qui vérifie la réactivité des programmes en les abstrayant en comportements à l'aide d'un système de types à effets. Notre objectif est de trouver un bon compromis entre la complexité de l'analyse et sa précision pour les programmes réactifs typiques. La simplicité de l'analyse est obligatoire pour que le programmeur soit en mesure de comprendre les messages d'erreur et comment résoudre les problèmes de réactivité. Notre travail est appliqué et mis en oeuvre dans le langage synchrone fonctionnel ReactiveML. Il gère la récursivité, les processus d'ordre supérieur et les signaux de première classe. Nous prouvons la correction de notre analyse par rapport à la sémantique grands pas du langage~: un programme bien typé avec des effets réactifs est réactif. L'analyse est facile à mettre en oeuvre et assez générique pour être applicable à d'autres modèles de concurrence, tels que les coroutines. Ce rapport de recherche est la version étendue de l'article publié dans les actes de la 21ème édition de l'International Static Analysis Symposium
    corecore